package iterables;

import interfaces.Expresion;
import java.util.*;
import tiposFueraDeLaAPI.*;

public class FactoriaDeAgregados{	
	
	public static <T> Collection<T> creaCollection(){
		return new ArrayList<T>();		
	}
	
	public static <T>Set<T> creaSet(){
		return new HashSet<T>();
	}
	
	public static <T>List<T> creaList(){
		return new LinkedList<T>();
	}
	
	public static <T1,T2>Map<T1,T2> creaMap(){
		return new HashMap<T1,T2>();
	}
	
	public static <T>SortedSet<T> creaSortedSet (Comparator<? super T> c){
		return new TreeSet<T>(c);
	}

	public static <T1,T2>SortedMap<T1,T2> creaSortedMap(Comparator<? super T1> c){
		return new TreeMap<T1,T2>(c);
	}
	
	public static <T>Bolsa<T> creaBolsa(){
		return new BolsaImpl<T>();
	}
	
	public static <T>NavigableSet<T> creaNavigableSet(Comparator<? super T> c){
		return new TreeSet<T>();
	}
	
	public static <T,K> ConjuntoIndexado <T,K> creaConjuntoIndexado (Expresion<T,K> obtieneClave){
		return new ConjuntoIndexadoImpl<T,K>(obtieneClave);
	}
}